
//
//  MyTableViewCell1.m
//  UI14_豆瓣完整版
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "MyTableViewCell1.h"

@implementation MyTableViewCell1



- (void)dealloc {
    [_imageView1 release];
    [_nameLabel release];
    [_addressLabel release];
    [_phoneLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)createCell {
    
    self.imageView1 = [[UIImageView alloc] init];
    [self.contentView addSubview:self.imageView1];
    [_imageView1 release];
    
    self.nameLabel = [[UILabel alloc] init];
    [self.imageView1 addSubview:self.nameLabel];
    [_nameLabel release];
    
    self.addressLabel = [[UILabel alloc] init];
    [self.imageView1 addSubview:self.addressLabel];
    [_addressLabel release];
    
    self.phoneLabel = [[UILabel alloc] init];
    [self.imageView1 addSubview:self.phoneLabel];
    [_phoneLabel release];
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.imageView1.frame = CGRectMake(10, 5, 360, 140);
    self.imageView1.backgroundColor = [UIColor whiteColor];
    self.imageView1.image = [UIImage imageNamed:@"bg_eventlistcell@2x.png"];
    
    self.nameLabel.frame = CGRectMake(10, 0, 280, 40);
    self.nameLabel.backgroundColor = [UIColor clearColor];
    self.nameLabel.font = [UIFont systemFontOfSize:20];
    
    self.addressLabel.frame = CGRectMake(10, 50, 280, 40);
    self.addressLabel.backgroundColor = [UIColor clearColor];
    self.addressLabel.font = [UIFont systemFontOfSize:15];
    self.addressLabel.numberOfLines = 2;
    
    self.phoneLabel.frame = CGRectMake(10, 100, 150, 35);
    self.phoneLabel.backgroundColor = [UIColor clearColor];
    self.phoneLabel.font = [UIFont systemFontOfSize:20];
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
